import React from 'react';
import {BrowserRouter,Route,Switch} from 'react-router-dom';
//引入页面
import Main from '../pages/main';
import Global from '../pages/global';
import Life from '../pages/life';
import Mask from '../pages/mask';
import Mmms from '../pages/mmms';
import Lognin from '../pages/lognin';
import Center from '../pages/center';
import ShoppingCart from '../pages/shoppingcart';
import Details from '../pages/details';

//引入组件
import Header from '../components/common/header';



//定义路由表
const App = ()=>(
    <BrowserRouter>
        <div>
            <Header />
            <Switch>
                <Route path='/' exact component={Main}/>
                <Route path='/global' exact component={Global}/>
                <Route path='/life' exact component={Life}/>
                <Route path='/mask' exact component={Mask}/>
                <Route path='/mmms' exact component={Mmms}/>
                <Route path='/lognin' exact component={Lognin}/>
                <Route path='/center' exact component={Center}/>
                <Route path='/shoppingcart' exact component={ShoppingCart}/>
                <Route path='/details' component={Details}/>
            </Switch>
        </div>
    </BrowserRouter>
)

export default App;